/**
 * 组件：位置组件
 * Author:Colin3dmax
 */
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {
    StyleSheet,
    View,
    Text,
    Image,
    TouchableOpacity,
} from 'react-native';
import Util from '../utils/util';


class CompLocationCity extends Component {

    static propTypes = {
        city:PropTypes.string,
    }

    static defaultProps = {
        city:PropTypes.string,
    }

    constructor(props) {
        super(props)
        this.state = {}
    }

    componentDidMount() {

    }

    render() {
        const {city} = this.props
        return (
            <View style={styles.cityPanel}>
                <Image style={styles.iconCity} source={require('../../spe/yuanwangjiaoyou/images/home/weizhi_ico.png')}/>
                <Text style={styles.city}>{city}</Text>
            </View>
        );
    }
}

const styles = StyleSheet.create({
    cityPanel: {
        flexDirection: 'row',
        alignItems: 'center',
        justifyContent: 'center',
        paddingLeft: 4,
        paddingRight: 4,
        marginRight: 4,
    },
    iconCity:{
        width:15,
        height:15,
        resizeMode:'contain',
    },
    city: {
        color: 'white',
        fontSize: 12,
        marginLeft:2,
        backgroundColor: 'transparent',
    },
});

export default CompLocationCity;